#ifndef __eeprom_driver_H_
#define __eeprom_driver_H_

#define EEPROM_ADDRESS 	    ((u32)0x0806F000)
#define EEPROM_PAGE_SIZE	(0x100)
#define EEPROM_SIZE			(0x1000) //4k
#define EEPROM_PAGE_NUM		(EEPROM_SIZE/EEPROM_PAGE_SIZE)


void eeporm_init(void);
void eeprom_read(u32 Page_Address, u8 *pbuf );
void eeprom_erase(u32 Page_Address);
void eeprom_write(u32 Page_Address, void *pbuf);
u8 eeprom_page_erase_ok(u32 Page_Address);
void eeprom_page_buff_pading(u8 * addr);
u32 eeprom_crc_calcblock(u32 buff[], u32 lenght);

#endif
